﻿using System;
using System.Data;
using System.Configuration;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Xml.Linq;
namespace DAL
{
    /// <summary>
    /// Summary description for Warranty
    /// </summary>
    public partial class Warranty
    {
        public static string[] GetWarrantyList(string prefixText, int count)
        {
            using (DAL.EShopDBDataContext db = new DAL.EShopDBDataContext(ConfigurationManager.ConnectionStrings["EShopConnectionString"].ConnectionString))
            {
                var war = from b in db.Warranties
                          where b.Value.StartsWith(prefixText)
                          select b.Value;
                return war.ToArray<string>();
            }
        }
    }
}